package com.File.A01File;

import java.io.File;
import java.io.FileFilter;

public class A09 {
    public static void main(String[] args) {
        File file = new File("D:\\\\TestFile\\\\TestFileRead");
        File[] files = file.listFiles(new FileFilter() {
            @Override
            public boolean accept(File pathname) {
                return pathname.isFile() && pathname.getName().endsWith(".txt");
            }
        });
        for (File file1 : files) {
            System.out.println(file1);
        }
        
    }
}
